<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.util.Util"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.action.ActionCreator"%>
<%@page import="com.shsh.safemanage.action.BrowseProblemAction"%>
<%@page import="com.shsh.safemanage.model.Problem"%>
<%@page import="com.shsh.safemanage.model.Tendency"%>
<%@page import="java.util.List"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.ProblemDao"%>

<%
{
BrowseProblemAction browseAction = ActionCreator.createBrowseProblemAction();
List<Tendency> problemList = browseAction.browseTendencys(request);
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
	<tr>
		<td width="8"  class="appbg">&nbsp;</td>
		<td width="85" class="appbg"><img src="images/trace.gif"  style="vertical-align:middle;"/>查询结果</td>
		<td width="229" class="appbg">&nbsp;</td>
		<td width="58" class="appbg">&nbsp;</td>
		<td width="84" class="appbg">&nbsp;</td>
		<td width="74" class="appbg">&nbsp;</td>
		<td colspan="2" class="appbg">&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan="8" height="40">查询到<font color="#FF0000"><%=problemList.size()%></font>条记录。</td>
	</tr>
	<tr>
		<td class="a_text2" width="20%" height="30" colspan="2">单位</td>
		<td class="a_text2" width="20%">装置</td>
		<td width="12%" class="a_text2" align="center">事苗类型</td>
		<td width="20%" class="a_text2">事苗名称</td>
		<td width="6%" class="a_text2" align="center">发现人</td>
		<td width="12%" class="a_text2" align="center">填报日期</td>
		<td width="10%" class="a_text2" align="center">查看</td>
		<td width="17"></td>
	</tr>
	<%
	int row = 0;
	for (Tendency problem : problemList) {
		row++;
	%>
	<tr>
		<td class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>"
			colspan="2"><%=problem.getDepartment1Name()%></td>
		<td class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<%=problem.getEquipmentName()%></td>
		<td align="center"  class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<%=problem.getTendencyType()%></td>
		<td class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<%=problem.getProblemTitle()%></td>
		<td align="center" class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<%=problem.getWriteUserName()%></td>
		<td align="center" class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<%=Util.formatDate(problem.getWriteTime().getTime())%></td>
		<td align="center" class="a_text3" style="border-bottom:1px #E3E3E3 dashed;border-right:1px #E3E3E3 dashed; <%=(row % 2 == 1)? "background: #F8F8FF":"background: #DCDCDC"%>">
			<a href="javascript:" onclick="loadPageSection('<%=request.getContextPath()%>/tendency_feedback.jsp', 'mainContentDiv', {id:<%=problem.getId()%>, fromPage:'tendency'}, true)"
			style="color: <%=(problem.getProcessStatus() == Constants.PROBLEM_STATUS_CLOSE)? "black":"red"%>">详细内容</a></td>
		<td width="17"></td>
	</tr>
	<%
	}
	%>
</table>
<%
}
%>